package com.java.day02;

import java.util.Scanner;

/**
 *需求说明：
 * 会员购物时，根据输入积分的不同享受不同的折扣
 * 计算会员购物时获得的折扣输出实付金额
 * 会员积分x 折扣
 * x ＜ 2000 9折
 * 2000 ≤ x ＜ 4000 8折
 * 4000 ≤ x ＜ 8000 7折
 * x ≥ 8000 6折
 * */
public class Demo5 {
    public static void main(String[] args) {
        //积分
        double points;
        //消费金额
        double spend;
        Scanner scanner = new Scanner(System.in);

        System.out.println("请输入购物积分");
        points = scanner.nextDouble();

        System.out.println("请输入消费金额");
        spend = scanner.nextDouble();

        if(points<2000){
            System.out.println("您将享受9折优惠,实付金额为"+(spend*0.9));
        } else if (2000<=points&&points<4000) {
            System.out.println("您将享受8折优惠,实付金额为"+(spend*0.8));
        } else if (4000<=points&&points<8000) {
            System.out.println("您将享受7折优惠,实付金额为"+(spend*0.7));
        }else if (8000<=points) {
            System.out.println("您将享受6折优惠,实付金额为"+(spend*0.6));
        }
    }
}
